#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    //添加默认选项
    ui->radioButton_man->setChecked(true    );
//ui->radioButton_other->setCheckable(false);;
    ui->radioButton_other->setEnabled(false);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_radioButton_man_clicked()
{
    ui->label->setText("你选择的性别为: 男");

}

void Widget::on_radioButton_wenma_clicked()
{
    ui->label->setText("你选择的性别为: 女");
}

void Widget::on_radioButton_other_clicked()
{
    ui->label->setText("你选择的性别为: 其他") ;

}
